<template>
  <div class="homepage">
    <div class="nav">
      <div class="banxin">
        <div class="nav-l">
          <a href="#"
             class="chuxin">初心博客</a>
          <ul>
            <li><a href="#">首页</a></li>
            <li><a href="#">鹰眼</a></li>
            <li><a href="#">面试宝典</a></li>
          </ul>
        </div>
        <div class="nav-u">
          <a href="#">登录</a><a href="#">注册</a>
        </div>
      </div>
    </div>
    <div class="banxin">
      <div class="banner-l">
        <div class="block">
          <!-- <span class="demonstration">默认 Hover 指示器触发</span> -->
          <el-carousel height="450px">
            <el-carousel-item v-for="item in 4"
                              :key="item">
              <h3 class="small">{{ item }}</h3>
            </el-carousel-item>
          </el-carousel>
        </div>
      </div>
      <div class="banner-r">
        <el-card class="box-card">
          <div slot="header"
               class="clearfix">
            <a href="#">开班动态</a>
          </div>
          <ul>
            <li class="text item"><a href="#">高级前端全栈班05期 <span>2020-2-2</span> </a></li>
            <li class="text item"><a href="#">高级前端全栈班05期 <span>2020-2-2</span> </a></li>
            <li class="text item"><a href="#">高级前端全栈班05期 <span>2020-2-2</span> </a></li>
            <li class="text item"><a href="#">高级前端全栈班05期 <span>2020-2-2</span> </a></li>
            <li class="text item"><a href="#">高级前端全栈班05期 <span>2020-2-2</span> </a></li>
          </ul>
        </el-card>
        <el-card class="box-card">
          <div slot="header"
               class="clearfix">
            <a href="#">最新动态</a>
          </div>
          <ul>
            <li class="text item"><a href="#">高级前端全栈班05期 <span>2020-2-2</span> </a></li>
            <li class="text item"><a href="#">高级前端全栈班05期 <span>2020-2-2</span> </a></li>
            <li class="text item"><a href="#">高级前端全栈班05期 <span>2020-2-2</span> </a></li>
            <li class="text item"><a href="#">高级前端全栈班05期 <span>2020-2-2</span> </a></li>
            <li class="text item"><a href="#">高级前端全栈班05期 <span>2020-2-2</span> </a></li>
          </ul>
        </el-card>
        <el-card class="box-card">
          <div slot="header"
               class="clearfix">
            <a href="#">联系我们</a>
          </div>
          <a href="#">微信号：gzx2550</a>
        </el-card>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  beforeCreate () {

    document.querySelector('body').setAttribute('style', 'background-color:rgb(240, 240, 240) ')

  },
}
</script>

<style lang="less" scoped>
a {
  text-decoration: none;
  color: rgb(34, 33, 33);
}
.nav-l li {
  display: inline;
}
.nav-l li a {
  float: left;
  padding: 0 20px;
  box-sizing: border-box;
  height: 80px;
  line-height: 80px;
}
.nav-l li a:hover {
  color: rgb(255, 187, 0) !important ;
  border-bottom: 2px solid rgb(255, 187, 0) !important;
}
.nav-u a {
  float: left;
  padding: 0 20px;
  box-sizing: border-box;
  height: 80px;
  line-height: 80px;
}
.nav-u a:hover {
  color: rgb(255, 187, 0) !important ;
  border-bottom: 2px solid rgb(255, 187, 0) !important;
}

.nav {
  width: 100%;
  height: 80px;
  background-color: rgb(34, 32, 32);
  .banxin {
    width: calc(100% - 200px);
    // height: 80px;
    // background-color: red;
    margin: 0 auto;
    .nav-l {
      width: 500px;
      height: 80px;
      // background-color: blue;
      float: left;
      padding: 0 40px;
      box-sizing: border-box;
      a {
        float: left;
        line-height: 80px;
        color: #fff;
      }
      .chuxin {
        font-size: 22px;
        font-weight: 900;
      }
    }
    .nav-u {
      width: 200px;
      height: 80px;
      // background-color: blue;
      float: right;
      padding: 0 20px;
      box-sizing: border-box;
      a {
        height: 80px;
        line-height: 80px;
        text-indent: center;
        color: #fff;
      }
    }
  }
}
.banxin {
  width: calc(100% - 200px);
  height: 100vh;
  // height: 80px;
  // background-color: red;
  margin: 0 auto;
}
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 500px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.banner-l {
  width: 800px;
  height: 500px;
  float: left;
  // background-color: blue;
}
.banner-r {
  width: 300px;
  // height: 430px;
  float: right;
  // background-color: red;
  .text {
    font-size: 14px;
  }

  .item {
    margin-bottom: 18px;
  }

  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }
  .clearfix:after {
    clear: both;
  }

  .box-card {
    width: 300px;
    background-color: #fff;
    a {
      display: block;
    }
    span {
      color: red;
      margin-left: 50px;
    }
    a:hover {
      color: rgb(255, 187, 0);
    }
  }
}
</style>>
